package com.cloudkinto.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cloudkinto.dto.home.HomeCostDto;
import com.cloudkinto.vo.cost.CostDetailVo;
import com.cloudkinto.vo.cost.CostPageVo;
import com.cloudkinto.entity.CostDo;
import com.cloudkinto.vo.cost.out.CostItemForOrderPageDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author hua
 * @since 2024-11-29
 */
public interface CostDao extends BaseMapper<CostDo> {
    IPage<CostPageVo> list(@Param("page") IPage<CostPageVo> page, @Param("map") Map<String, Object> map);

    List<CostPageVo> list(@Param("map") Map<String, Object> map);

    int getCount(Integer status, Long tenantId);

    CostDetailVo getCostById(Long id, Long tenantId);

    int updateDelete(Long orderId, String orderType, Integer moduleType, Long userId, Long companyId);

    List<CostItemForOrderPageDto> getItemList(List<Long> orderIds, String orderType, Long tenantId);

    List<HomeCostDto> getHomeCostDto(@Param("map") Map<String, Object> map);

}
